package com.huiquan.management.dao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.huiquan.framework.base.EnhancedBaseDao;
import com.huiquan.management.domain.AnalysisLabel;
import com.ibatis.sqlmap.client.SqlMapClient;

@Repository
public class AnalysisLabelDao extends EnhancedBaseDao<AnalysisLabel> {

	@Resource(name = "sqlMapClient")
	private SqlMapClient sqlMapClient;

	public static final String space = "ANALYSIS_LABEL.";

	public AnalysisLabelDao() {
		super(space);
	}
	@SuppressWarnings("unchecked")
	public List<Map<String, Object>> retrievePageRoleList(Map<String, Object> param) {
		return (List<Map<String, Object>>) this.list(space + "RETRIEVE_PAGE_ROLE_LIST",param, sqlMapClient);
	}
	public void deleteRelatByTabId(long tabId) {
		Map<String, Object> param = new HashMap<>();
		param.put("tabId", tabId);
		this.delete(space + "DELETE_RELAT_BY_TAB_ID",param, sqlMapClient);
	}
	@SuppressWarnings("unchecked")
	public List<Map<String, Object>> retrieveAllRole() {
		return (List<Map<String, Object>>) this.list(space + "RETRIEVE_ALL_ROLE", sqlMapClient);
	}
	@SuppressWarnings("unchecked")
	public List<Map<String, Object>> retrieveRoleByTab(Map<String, Object> param) {
		return (List<Map<String, Object>>) this.list(space + "RETRIEVE_ROLE_LIST_BY_TAB", param,sqlMapClient);
	}
}
